package com.kedi.welfarecenter.write.dao.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import java.util.Map;

@Mapper
public interface WriteMedicalPenFuseMapper {
    /**
     * 方法实现说明  如果有这个主键  就根据这个主键 新增医养融合服务
     * @author      ytw
     *@param       map
     * @return
     * @exception
     * @date        2019/7/24 14:14
     */
    @Insert("insert into oldlife_service (oldlife_id,vist_time,vist_content,service_street) values(#{oldlife_id},#{vist_time},#{vist_content},#{service_street})")
    Integer createoldlifeservice(Map map);
    /**
     * 方法实现说明  如果没有则插入oldlife 返回主键id
     * @author      ytw
     *@param        map
     * @return
     * @exception
     * @date        2019/7/24 14:35
     */
    @Insert("insert into oldlife (oldlife.name)values(#{name})")
    @Options(useGeneratedKeys = true,keyProperty = "oldlife_id")
    Integer createoldlifename(Map map);
}
